<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>媒体查询简介</title>
    <style>
        *{
            box-sizing: border-box;
        }
        body,html{
            height: 100%;
            background-color: gray;
            margin: 0px;
        }
        .nav{
            background-color: white;
        }
        .container{
            width: 900px;
            margin: 0px auto;
            height: 60px;
            
        }
        #nav-menu{
            float: left;
            line-height: 60px;
        }
        #nav-menu a{
            margin-right: 20px;
        }
        #search{
            float: right;
            padding: 10px;
            width: 150px;
            height: 40px;
            border: 1px solid black;
            border-radius: 17px;
            margin: 10px 0px;
        }

        main{
            width: 900px;
            margin: 20px auto;
        }
        main section:nth-child(1){
            width: 440px;
            float: left;
            height: 300px;
            background-color: yellow;
        }
        main section:nth-child(2){
            width: 440px;
            float: right;
            height: 300px;
            background-color: blue;
        }
        
        @media screen and (max-width:900px){
            #search{
                display: none;
            }
            .container{
                width: 600px;
            }
            main{
                width: 500px;
            }
            #content section{
                float: none;
                width: 350px;
                height: 200px;
                margin:0px auto 20px;
            }

        }

        @media screen and (max-width:400px){

        }

    </style>
    <link rel="stylesheet" href="index.css" media="screen and (min-aspect-ratio:2/1)">
</head>
<body>
    <div class="nav">
        <div class="container">
            <span id="nav-menu">
                <a href="">html5</a>
                <a href="">css3</a>
                <a href="">javaScript</a>
                <a href="">php</a>
                <a href="">java</a>
            </span>
            <span id="search"><a href="">搜索</a></span>
        </div>
    </div>

    <main id="content">
        <section></section>
        <section></section>
    </main>
</body>
</html>